Skip to content

Create a small JMH benchmark harness#457

Merged
pkwarren merged 4 commits intomainfrom
pkw/jmh-benchmarks
Apr 23, 2026
Merged

Create a small JMH benchmark harness#457
pkwarren merged 4 commits intomainfrom
pkw/jmh-benchmarks

Conversation

@pkwarren
Copy link
Copy Markdown
Member

In order to verify performance fixes (like #451 and #454), it would be helpful to be able to write a JMH benchmark and quickly measure the impact.

This adds a benchmark module to the Gradle build. CI only verifies the build of the benchmarks. Added a README showing how to add benchmarks and measure improvements locally.

Instead of outputting JSON or other format, created a jq script to roughly print out output similar to benchstat for Go.

In order to verify performance fixes (like #451 and #454), it would be
helpful to be able to write a JMH benchmark and quickly measure the
impact.

This adds a benchmark module to the Gradle build. CI only verifies the
build of the benchmarks. Added a README showing how to add benchmarks
and measure improvements locally.

Instead of outputting JSON or other format, created a jq script to
roughly print out output similar to benchstat for Go.
Copy link
Copy Markdown
Member

@stefanvanburen stefanvanburen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nothing blocking, just wondering

Comment thread benchmarks/build.gradle.kts Outdated
@@ -0,0 +1,101 @@
// Copyright 2023-2026 Buf Technologies, Inc.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: think we ought to bump license-header.years in general; can be separate?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're looking at an older version - this is already bumped:

# Argument to the license-header CLI
license-header.years = 2023-2026

@pkwarren pkwarren requested a review from stefanvanburen April 23, 2026 18:37
@pkwarren pkwarren merged commit 52ea836 into main Apr 23, 2026
4 checks passed
@pkwarren pkwarren deleted the pkw/jmh-benchmarks branch April 23, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants